﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace WinFormsApp1.Neo4jGrid
{
    /// <summary>
    /// 这个是网格内对象
    /// </summary>
    internal class GridEntity : ICommonEntityConvertable, ICommonEntity
    {
        public string id {get; set; }
        public string entityProperities { get; set; }
        public string TableRowId { get; set; }
        public string name { get; set; }

        public CommonEntity ToCommonEntity()
        {
            var a= new CommonEntity()
            {
                id = id,
            };
            a.labels = new List<string>() { TableRowId };
            a.name = name;
            a.properties = JsonSerializer.Deserialize<Dictionary<string,string>>(entityProperities);
            return a;
        }
    }
}
